﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TemplatePage.Master" AutoEventWireup="true" CodeBehind="thong-ke-phieu-chi-tieu.aspx.cs" Inherits="nhakhoachauau.WebForm11" %>
<%@ Register Src="~/UC/Menu.ascx" TagName="UCMenu" TagPrefix="UCMENU" %>
<%@ Register Src="~/UC/Title.ascx" TagName="UCTitle" TagPrefix="UCTITLE" %>
<%@ Register Src="~/UC/MenuChucNang.ascx" TagName="UCMenuChucNang" TagPrefix="UCMENUCHUCNANG" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
    <title>THỐNG KÊ PHÍ TÍNH TIỀN - 30/9/2013</title>
    <link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
    <link href="assets/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" />
    <link href="assets/bootstrap/css/bootstrap-fileupload.css" rel="stylesheet" />
    <link href="assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <link href="css/style.css" rel="stylesheet" />
    <link href="css/style-responsive.css" rel="stylesheet" />
    <link href="css/style-default.css" rel="stylesheet" id="style_color" />
    <link rel="stylesheet" type="text/css" href="assets/chosen-bootstrap/chosen/chosen.css" />
    <link rel="stylesheet" type="text/css" href="assets/bootstrap-datepicker/css/datepicker.css" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" runat="server">
    <script src="js/jquery-1.8.3.min.js"></script>
    <!-- BEGIN JAVASCRIPTS -->
    <!-- Load javascripts at bottom, this will reduce page load time -->
    <script src="js/jquery.nicescroll.js" type="text/javascript"></script>
    <script src="assets/bootstrap/js/bootstrap.min.js"></script>
    <script src="js/jquery.blockui.js"></script>
    <script src="assets/chart-master/Chart.js"></script>
    <script type="text/javascript" src="assets/chosen-bootstrap/chosen/chosen.jquery.min.js"></script>
    <script type="text/javascript" src="assets/uniform/jquery.uniform.min.js"></script>
    <script type="text/javascript" src="assets/bootstrap-wysihtml5/wysihtml5-0.3.0.js"></script>
    <script type="text/javascript" src="assets/bootstrap-wysihtml5/bootstrap-wysihtml5.js"></script>
    <script type="text/javascript" src="assets/clockface/js/clockface.js"></script>
    <script type="text/javascript" src="assets/jquery-tags-input/jquery.tagsinput.min.js"></script>
    <script type="text/javascript" src="assets/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
    <script type="text/javascript" src="assets/bootstrap-daterangepicker/date.js"></script>
    <script type="text/javascript" src="assets/bootstrap-daterangepicker/daterangepicker.js"></script>
    <script type="text/javascript" src="assets/bootstrap-colorpicker/js/bootstrap-colorpicker.js"></script>
    <script type="text/javascript" src="assets/bootstrap-timepicker/js/bootstrap-timepicker.js"></script>
    <script type="text/javascript" src="assets/bootstrap-inputmask/bootstrap-inputmask.min.js"></script>
    <script src="assets/fancybox/source/jquery.fancybox.pack.js"></script>
    <!-- ie8 fixes -->
    <!--[if lt IE 9]>
   <script src="js/excanvas.js"></script>
   <script src="js/respond.js"></script>
   <![endif]-->
    <!--common script for all pages-->
    <script src="js/common-scripts.js"></script>
    <!--script for this page only-->
    <script src="js/chartjs.js"></script>
    <script src="js/form-component.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
       <UCMENU:UCMenu runat="server" ID="ucmenu1" />

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    
    <div class="row-fluid">
        <div class="span12">
            <div id="theme-change" class="hidden-phone">
                <i class="icon-cogs"></i><span class="settings"><span class="text">Theme Color:</span>
                    <span class="colors"><span class="color-default" data-style="default"></span><span
                        class="color-green" data-style="green"></span><span class="color-gray" data-style="gray">
                        </span><span class="color-purple" data-style="purple"></span><span class="color-red"
                            data-style="red"></span></span></span>
            </div>
            <h3 class="page-title">
                QUẢN LÝ CHI TIÊU
            </h3>
            <ul class="breadcrumb">
                <li><a href="default.aspx">TRANG CHỦ</a> <span class="divider">/</span> </li>
                <li><a href="default.aspx">THÔNG KÊ CHI TIÊU</a></li>
                <li class="pull-right search-wrap">
                    <div action="" class="hidden-phone">
                    <div class="input-append search-input-area">
                        <input class="" id="appendedInputButton" type="text">
                        <button class="btn" type="button">
                            <i class="icon-search"></i>
                        </button>
                    </div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    <div class="row-fluid">
        <div class="span4">
            <!-- BEGIN EXAMPLE TABLE widget-->
            <div class="widget">
                <div class="widget-title">
                    <h4>
                        <i class="icon-reorder"></i>Cài đặt thông kê</h4>
                    <span class="tools"><a href="javascript:;" class="icon-chevron-down"></a><a href="javascript:;"
                        class="icon-remove"></a></span>
                </div>
                <div class="widget-body">
                    <div class="cmxform form-horizontal">
                    <div class="control-group">
                        <label class="control-label" style="width: 130px">
                            Chọn báo cáo</label>
                        <div class="controls" style="margin-left: 135px;">
                            <%--<select class="span6 chzn-select" style="width: 100%" data-placeholder="Chọn chức năng"
                                tabindex="1">
                                <option value="1">Báo cáo theo ngày</option>
                                <option value="2">Báo cáo theo tháng</option>
                                <option value="3">Báo cáo theo năm</option>
                            </select>--%>
                            <asp:DropDownList ID="ddlThongKe" runat="server" CssClass="span6 chzn-select" data-placeholder="Chọn chức năng"
                                tabindex="1" style="width: 100%" AutoPostBack="True" 
                                onselectedindexchanged="ddlThongKe_SelectedIndexChanged">
                                <asp:ListItem Value="1">Báo cáo theo ngày</asp:ListItem>
                                <asp:ListItem Value="2">Báo cáo theo tháng</asp:ListItem>
                                <asp:ListItem Value="3">Báo cáo theo năm</asp:ListItem>
                            </asp:DropDownList>
                        </div>
                    </div>
                    <div class="control-group" id="div_ChonNgay" runat="server">
                        <label class="control-label" style="width: 130px">
                            Chọn ngày</label>
                        <div class="controls" style="margin-left: 135px;">
                            <input id="dp1" clientidmode="Static" type="text" style="width: 180px" value="" size="16" class="m-ctrl-medium" runat="server" />
                        </div>
                    </div>
                    <div class="control-group" id="div_ChonThang" runat="server">
                        <label class="control-label" style="width: 130px">
                            Chọn tháng</label>
                        <div class="controls" style="margin-left: 135px;">
                            <div class="input-append date" id="dpMonths" data-date="102/2012" data-date-format="mm-yyyy"
                                data-date-viewmode="years" data-date-minviewmode="months" style="width: 180px">
                                <input id="txtChonThang" clientidmode="Static" runat="server" class="m-ctrl-medium" style="width: 150px" size="16" type="text" value="02-2012"
                                    readonly>
                                <span class="add-on"><i class="icon-calendar"></i></span>
                            </div>
                        </div>
                    </div>
                   <div class="control-group" id="div_ChonNam" runat="server">
                        <label class="control-label" style="width: 130px">
                            Chọn năm</label>
                        <div class="controls" style="margin-left: 135px;">
                            <%--<select class="span6 chzn-select" style="width: 100%" data-placeholder="Chọn năm"
                                tabindex="1">
                                <option value="" ></option>
                                <%
                                    for (int i = DateTime.Now.Year; i >= 2000; i--)
                                    {
                                        Response.Write("<option value='Category 1'>" + i + "</option>");
                                    }
                                     %>
                            </select>--%>
                            <asp:DropDownList ID="ddlChonNam" CssClass="span6 chzn-select" 
                                style="width: 100%" runat="server" data-placeholder="Chọn năm"
                                tabindex="1" onload="ddlChonNam_Load">

                            </asp:DropDownList>
                        </div>
                    </div>
                    <div class="form-actions" style="margin: 0px auto;">
                        <%--<button class="btn btn-success" type="submit" style="width: 130px; height: 30px">
                            <i class="icon-search"></i> Thống kê</button>--%>
                        <asp:Button ID="btnThongKe" runat="server" Text="Thống kê" CssClass="btn btn-success" style="width: 130px; height: 30px"
                            onclick="btnThongKe_Click" />
                    </div>
                    </div>
                </div>
            </div>
            <!-- END EXAMPLE TABLE widget-->
        </div>
        <div class="span8">
            <!-- BEGIN BLANK PAGE PORTLET-->
            <div class="widget purple">
                <div class="widget-title">
                    <h4>
                        <i class="icon-edit"></i>Thống kê phí chi tiêu - 
                        <asp:Label ID="lblTitle" runat="server" Text="..."></asp:Label>
                    </h4>
                    <span class="tools"><a href="javascript:;" class="icon-chevron-down"></a><a href="javascript:;"
                        class="icon-remove"></a></span>
                </div>
                <div class="widget-body">
                    <div class="row-fluid">
                        <div class="span12">
                            <div class="text-center">
                                <%--<img alt="" src="img/vector-lab.jpg">--%>
                            </div>
                            <hr>
                        </div>
                    </div>
                    <asp:Repeater ID="rptThongKeTheoNgay" runat="server" 
                        onload="rptThongKeTheoNgay_Load" 
                        onitemdatabound="rptThongKeTheoNgay_ItemDataBound">
                        <HeaderTemplate><div class="row-fluid">
                        <table class="table table-striped table-hover">
                            <thead>
                                <tr>
                                    <th>
                                        #
                                    </th>
                                    <th style="width: 200px">
                                        Nhân viên lập
                                    </th>
                                    <th>
                                        Lý do
                                    </th>
                                    <th class="hidden-480" style="white-space: 200px">
                                        Số tiền chi
                                    </th>
                                </tr>
                            </thead><tbody></HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <asp:Label ID="lblSTT" runat="server" Text="..."></asp:Label>
                                </td>
                                <td>
                                     <asp:Label ID="lblTenNhanVien" runat="server" Text="..."></asp:Label>
                                </td>
                                <td class="hidden-480">
                                    <%#Eval("ly_do_chi") %>
                                </td>
                                <td class="hidden-480">
                                    <span style="color: Red; font-weight: 900"><%#Eval("so_tien_chi","{0:#,##0}") %> VNĐ</span>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate> </tbody>
                        </table>
                    </div></FooterTemplate>
                    </asp:Repeater>
                    <asp:Repeater ID="rptThongKeTheoThang" runat="server" 
                        onitemdatabound="rptThongKeTheoThang_ItemDataBound">
                        <HeaderTemplate><div class="row-fluid">
                        <table class="table table-striped table-hover">
                            <thead>
                                <tr>
                                    <th>
                                        #
                                    </th>
                                    <th style="width: 200px">
                                        Ngày lập phiếu
                                    </th>
                                    <%--<th>
                                        Lý do
                                    </th>--%>
                                    <th class="hidden-480" style="white-space: 200px">
                                        Tổng tiền
                                    </th>
                                </tr>
                            </thead></HeaderTemplate>
                            <ItemTemplate>
                                <tr>
                                    <td>
                                        <asp:Label ID="lblSTT" runat="server" Text="..."></asp:Label>
                                    </td>
                                    <td>
                                        <%#Eval("NgayChi","{0:MM-dd-yyyy}")%>
                                    </td>
                                    <td class="hidden-480">
                                        <span style="color: Red; font-weight: 900"><%#Eval("TongChiThang","{0:#,##0}") %> VNĐ</span>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        <FooterTemplate></tbody>
                        </table>
                    </div></FooterTemplate>
                    </asp:Repeater>
                    <asp:Repeater ID="rptThongKeTheoNam" runat="server" 
                        OnItemDataBound="rptThongKeTheoNam_ItemDataBound" >
                        <HeaderTemplate><div class="row-fluid">
                        <table class="table table-striped table-hover">
                            <thead>
                                <tr>
                                    <th>
                                        #
                                    </th>
                                    <th style="width: 200px">
                                        Tháng
                                    </th>
                                    <th class="hidden-480" style="white-space: 200px">
                                        Tổng tiền
                                    </th>
                                </tr>
                            </thead>
                            <tbody></HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                    <td>
                                        <asp:Label ID="lblSTT" runat="server" Text="..."></asp:Label>
                                    </td>
                                    <td>
                                        Tháng <%#Eval("Thang") %>
                                    </td>
                                    <td class="hidden-480">
                                        <span style="color: Red; font-weight: 900"><%#Eval("TongTien","{0:#,##0}") %> VNĐ</span>
                                    </td>
                                </tr>
                        </ItemTemplate>
                        <FooterTemplate></tbody>
                                </table>
                            </div>
                        </FooterTemplate>
                    </asp:Repeater>
                    <%--<div class="row-fluid">
                        <table class="table table-striped table-hover">
                            <thead>
                                <tr>
                                    <th>
                                        #
                                    </th>
                                    <th style="width: 200px">
                                        Nhân viên lập
                                    </th>
                                    <th>
                                        Lý do
                                    </th>
                                    <th class="hidden-480" style="white-space: 200px">
                                        Số tiền chi
                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>
                                        1
                                    </td>
                                    <td>
                                        Nguyễn Văn C
                                    </td>
                                    <td class="hidden-480">
                                        Sửa máy tính
                                    </td>
                                    <td class="hidden-480">
                                        <span style="color: Red; font-weight: 900">220,000 VNĐ</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>--%>
                    <div class="space20">
                    </div>
                    <div class="row-fluid">
                        <div class="span4 invoice-block pull-right">
                            <ul class="unstyled amounts">
                                <li><strong>Tổng :</strong> <span style="color: Red; font-size: large; font-weight: 900">
                                    <%Response.Write(string.Format("{0:#,##0}",this.TongChi)); %> VNĐ</span></li>
                            </ul>
                        </div>
                    </div>
                    <div class="space20">
                    </div>
                    <div class="row-fluid text-center">
                        <a class="btn btn-inverse btn-large hidden-print" onclick="javascript:window.print();">
                            In thống kê <i class="icon-print icon-big"></i></a>
                    </div>
                </div>
            </div>
            <!-- END BLANK PAGE PORTLET-->
        </div>
    </div>
    <div class="row-fluid">
        <div class="span6">
            <!-- BEGIN CHART PORTLET-->
            <div class="widget orange">
                <div class="widget-title">
                    <h4>
                        <i class="icon-reorder"></i>Biều đồ đường - Năm 2013</h4>
                    <span class="tools"><a href="javascript:;" class="icon-chevron-down"></a><a href="javascript:;"
                        class="icon-remove"></a></span>
                </div>
                <div class="widget-body">
                    <div class="text-center">
                        <canvas id="line" height="300" width="450"></canvas>
                    </div>
                </div>
            </div>
            <!-- END CHART PORTLET-->
        </div>
        <div class="span6">
            <!-- BEGIN CHART PORTLET-->
            <div class="widget blue">
                <div class="widget-title">
                    <h4>
                        <i class="icon-reorder"></i>Biều đồ cột - Năm 2013</h4>
                    <span class="tools"><a href="javascript:;" class="icon-chevron-down"></a><a href="javascript:;"
                        class="icon-remove"></a></span>
                </div>
                <div class="widget-body">
                    <div class="text-center">
                        <canvas id="bar" height="300" width="500"></canvas>
                    </div>
                </div>
            </div>
            <!-- END CHART PORTLET-->
        </div>
    </div>
</asp:Content>
